﻿<Window x:Class="My.CodePlex.TFSExplorer.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:My.CodePlex.TFSExplorer"
    xmlns:controls="clr-namespace:My.CodePlex.TFSExplorer.Controls"
    xmlns:res="clr-namespace:My.CodePlex.TFSExplorer.Resources"
    Title="{x:Static res:Resource.ProductNameLong}" MinHeight="700" MinWidth="800">
    <Grid>       
        <Grid.RowDefinitions>
            <RowDefinition Height="25" />
            <RowDefinition />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        
        <!-- The top menu bar -->
        <Menu Height="25" Name="MenuBar" Grid.Row="0">
            
            <!-- File menu items -->
            <MenuItem Header="{x:Static res:Resource.FileMenuItem}">
                <MenuItem Header="{x:Static res:Resource.OpenTFSServerMenuItem}" Click="OpenTFSServerMenuItemClick" />
                <Separator />
                <MenuItem Header="{x:Static res:Resource.ExitMenuItem}" Click="ExitMenuItemClick" />
            </MenuItem>

            <!-- View menu items -->
            <MenuItem Header="{x:Static res:Resource.ViewMenuItem}" Name="ViewMenuItem" IsEnabled="False">
                <MenuItem Header="{x:Static res:Resource.SourceCodeViewMenuItem}" Click="SourceCodeViewMenuItemClick" />
                <MenuItem Header="{x:Static res:Resource.PendingChangesViewMenuItem}" Click="PendingChangesViewMenuItemClick" />
                <MenuItem Header="{x:Static res:Resource.ShelveSetViewMenuItem}" Click="ShelveSetViewMenuItemClick" />
                <MenuItem Header="{x:Static res:Resource.UsersViewMenuItem}" Click="UsersViewMenuItemClick" />
                <MenuItem Header="{x:Static res:Resource.ServerDetailsViewMenuItem}" Click="ServerDetailsViewMenuItemClick" />
            </MenuItem>
            <MenuItem Header="{x:Static res:Resource.HelpMenuItem}">
                <MenuItem Header="{x:Static res:Resource.AboutMenuItem}" Click="AboutMenuItemClick" />
            </MenuItem>
        </Menu>

        <!-- The main tab control container -->
        <TabControl Grid.Row="1" Name="containerTabControl" Visibility="Hidden">
        
            <!-- First tab -->
            <TabItem x:Name="SourceTreeTabItem" Header="{x:Static res:Resource.SourceTreeTabItemHeader}">
                <Grid>
                    <local:SourceTreeControl x:Name="SourceTreeControl" />
                </Grid>
            </TabItem>

            <!-- Second tab -->
            <TabItem x:Name="ShelvesetTabItem" Header="{x:Static res:Resource.ShelvesetTabItemHeader}">
                <Grid>
                    <local:ShelveSetControl x:Name="ShelveControl" />
                </Grid>
            </TabItem>

            <!-- Third tab -->
            <TabItem x:Name="PendingChangesTabItem" Header="{x:Static res:Resource.PendingChangesTabItemHeader}">
                <Grid>
                    <local:PendingChangesControl x:Name="PendingChanges" />
                </Grid>
            </TabItem>

            <!-- Fourth tab -->
            <TabItem x:Name="UsersTabItem" Header="{x:Static res:Resource.UsersTabItemHeader}">
                <Grid>
                    <local:UsersControl x:Name="Users" />
                </Grid>
            </TabItem>

            <!-- Third tab -->
            <TabItem x:Name="ServerDetailsTabItem" Header="{x:Static res:Resource.ServerDetailsTabItemHeader}">
                <Grid>
                    <controls:ServerDetailsControl x:Name="ServerDetails" />
                </Grid>
            </TabItem>

        </TabControl>

        <!-- The bottom status bar -->
        <StatusBar Name="StatusBar" Grid.Row="2">
            <StatusBarItem>
                <StackPanel Orientation="Horizontal">
                    <local:WaitCursor x:Name="WaitCursor" Width="20" Height="20" />
                    <TextBlock Name="WindowStatus" FontSize="12" Margin="5,0"/>
                </StackPanel>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</Window>
